home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 32 / Mac Magazin and MacEasy Magazine CD - Issue 32.iso / Grafik & Text / OzTeX3.0 / Metafont / Inputs / ec / txitlod.mf < prev    next >
Text File  |  1997-03-16  |  13KB  |  293 lines

  1. % txitlod.mf
  2. %
  3. % (c) Copyright 1995, 1996, 1997 J"org Knappen
  4. %
  5. % This file is part of ecfonts version 1.0
  6. %
  7. % Please read the files 00readme.txt, 00inst.txt, 00error.txt, and
  8. % copyrite.txt for further information
  9. %
  10. % You find some documentation in ecdoc.tex (needs LaTeX2e)
  11. %
  12. % Included with permission of the original author
  13. %
  14. % This file contains the ten ITALIC digits in so-called old style.
  15. % Character codes \0060 through \0071 are generated.
  16. % GJC LOKHORST March 3, 1995
  17.  
  18. version_check(1,0);  % |version_check| was introduced in dc1.3
  19.  
  20. % All digits have the same width
  21. font_digit_width 9u#;
  22.  
  23. %% FROM OLDDIG
  24.  
  25. ecchar "Oldstyle numeral 0";
  26. beginchar("0",9u#,x_height#,0);
  27. italcorr .7x_height#*slant-max(.2u#,.95u#-.5curve#);
  28. adjust_fit(0,0);
  29. penpos1(vair,90); penpos3(vair,-90); penpos2(curve,180); penpos4(curve,0);
  30. if not monospace: interim superness:=sqrt(more_super*hein_super); fi
  31. x2r=hround max(.7u,1.45u-.5curve);
  32. x4r=w-x2r; x1=x3=.5w; y1r=h+o; y3r=-o;
  33. y2=y4=.5h-vair_corr; y2l:=y4l:=.52h;
  34. penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3)
  35.  & pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle;  % bowl
  36. penlabels(1,2,3,4); endchar;
  37.  
  38. ecchar "Oldstyle numeral 1";
  39. beginchar("1",9u#,x_height#,0);
  40. italcorr x_height#*slant+.5cap_stem#-4.25u#;
  41. adjust_fit(0,0);
  42. numeric light_stem; light_stem=hround .4[stem',cap_stem'];
  43. pickup tiny.nib;
  44. pos1(light_stem,0); pos2(light_stem,0);
  45. lft x1l=lft x2l=hround(.5(w+.5u)-.5cap_stem'); top y1=h+apex_o; bot y2=0;
  46. filldraw stroke z1e--z2e;  % stem
  47. if not serifs: save slab; slab=bar; fi
  48. dish_serif(2,1,a,1/3,min(2.25u,lft x2l-1.5u),
  49.   b,1/3,min(2.25u,w-1.25u-rt x2r)); % serif
  50. pickup crisp.nib; pos3(slab,-90); pos4(bar,-90);
  51. top y3l=h+apex_o; top y4l=if monospace: .8 else: .9 fi\\ h+apex_o;
  52. lft x4=max(1.25u,tiny.lft x1l-2.35u);
  53. tiny.rt x1r=lft x3+.25[tiny,hair];
  54. erase fill z3l{x4l-x3l,3(y4l-y3l)}...z4l{left}
  55.  --(x4l,h+apex_o+1)--(x3l,h+apex_o+1)--cycle; % erase excess at top
  56. filldraw stroke z3e{x4e-x3e,3(y4e-y3e)}..z4e{left};  % point
  57. penlabels(1,2,3,4); endchar;
  58.  
  59. ecchar "Oldstyle numeral 5";
  60. beginchar("5",9u#,x_height#,desc_depth#);
  61. italcorr x_height#*slant-u#;
  62. adjust_fit(0,0);
  63. numeric bot_thickness,light_hair;
  64. bot_thickness=max(fine.breadth,vround(slab-vair_corr));
  65. light_hair=hround(cap_hair if hefty: -2stem_corr fi);
  66. pickup tiny.nib; pos5(vair,180); pos6(vair,90);
  67. bot y5=vround(.53[-d,h]-vair);
  68. top y6r=max((vround .61803[-d,h])+o,top y6r+y5+eps-y6l);
  69. pos3(light_hair,0); pos4(light_hair,0);
  70. lft x3l=max(1.35u,2.1u-.5light_hair); x3=x4=x5; y4=y5;
  71. top y3=h if not hefty: +o fi;
  72. filldraw stroke z3e--z4e;  % thin stem
  73. penpos7(cap_stem-fine,0); penpos8(bot_thickness-fine,-90);
  74. fine.rt x7r=hround(w-.9u); x8=.5[u,x7]; x6=.5[x5,x7];
  75. erase fill z5--bot z5--(x6,bot y5)--z6{left}
  76.  ..tension .9 and 1..{x5-x6,3(y5-y6)}cycle; % erase excess in middle
  77. filldraw stroke z6e{left}..tension .9 and 1..{x5-x6,3(y5-y6)}z5e;  % link
  78. pickup fine.nib; pos6'(vair,90); z6'=z6;
  79. y7=.5[y6,y8]; bot y8r=-d-o;
  80. filldraw stroke pulled_arc.e(6',7) & pulled_arc.e(7,8);  % bowl
  81. if serifs: pos9(hair,-180); y9=.5[-d,y5]; lft x9r=hround .9u;
  82.  pos10(flare+1/3(cap_stem-stem),-180); bulb(8,9,10);  % bulb
  83. else: pos9(3/7[bot_thickness,flare],angle(-7u,-h-d));
  84.  lft x9r=hround .9u; bot y9r=(vround .15[-d,h])-o;
  85.  x9l:=good.x x9l; y9l:=good.y y9l;
  86.  filldraw stroke term.e(8,9,left,1,4); fi  % terminal
  87. if hefty: pickup crisp.nib; pos1(slab,90); pos2(hair,0);
  88.  top y1r=h; x1=x4; rt x2r=hround(w-1.5u);
  89.  y2=y1l-eps; arm(1,2,a,0,0);  % arm
  90. else: numeric flag_breadth; flag_breadth=7/8[vair,cap_curve];
  91.  pos1(flag_breadth,90); pos2(flag_breadth,60);
  92.  pos0(vair,90); top y1r=tiny.top y3; top y2r=(vround .95[-d,h])+o; y0r=y1r;
  93.  lft x1=tiny.lft x3l; x2r=.5[x1,x0]; rt x0=hround(w-1.6u);
  94.  erase fill top z1r--z1r...{right}z2r
  95.   --(x2r,top y1r)--cycle; % erase excess at top
  96.  filldraw stroke z1e...{right}z2e...z0e; fi  % flag
  97. penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar;
  98.  
  99. ecchar "Oldstyle numeral 6";
  100. beginchar("6",9u#,fig_height#,0);
  101. italcorr fig_height#*slant-u#;
  102. adjust_fit(0,0);
  103. numeric top_thickness,bot_thickness,side_thickness,pull;
  104. top_thickness=max(fine.breadth,vround(slab-2vair_corr));
  105. bot_thickness=max(fine.breadth,vround(slab-vair_corr));
  106. side_thickness=max(fine.breadth,hround 1/3[curve,cap_curve]);
  107. pull=min(.25,1.5superpull);
  108. pickup fine.nib; pos2(top_thickness,-270);
  109. pos3(side_thickness,-180); pos4(bot_thickness,-90);
  110. pos5(side_thickness,0); pos6(vair,90);
  111. lft x3r=w-rt x5r=hround max(.75u,1.5u-.5side_thickness);
  112. x4=x6-.1u=x2-u=.5w;
  113. top y2r=h+o; y3=.5[y2,y4]; bot y4r=-o;
  114. y5=.5[y4,y6]; top y6=vround 5/8h+o;
  115. path p; p=pulled_super_arc.l(3,4)(pull);
  116. numeric t; t=xpart(p intersectiontimes((x3r,y5)--(x4,y5)));
  117. pos7(thin_join,180); z7l=point t of p;
  118. (x,y6r)=whatever[z7l,z6l]; x6r:=min(x,.5[x5r,x6]);
  119. filldraw stroke pulled_super_arc.e(2,3)(pull)
  120.  & {{interim superness:=more_super; pulled_super_arc.e(3,4)(pull)}}
  121.  & {{less_tense; pulled_super_arc.e(4,5)(pull) & pulled_super_arc.e(5,6)(pull)}}
  122.  & z6e{left}...{direction t of p}z7e;  % arc and bowl
  123. if serifs: pos1(hair,-360); pos0(flare,-360);
  124.  rt x0r=max(rt x2+eps,hround(w-1.2u));
  125.  y0=vround min(.9h-.5flare,.85h+.5flare)+o;
  126.  {{less_tense; bulb(2,1,0)}};  % arc and bulb
  127. else: pos1(vround .1[top_thickness,flare],90);
  128.  top y1r=vround .97h+o; rt x1=hround(x5-.5);
  129.  filldraw stroke term.e(2,1,right,.9,4); fi  % terminal
  130. penlabels(0,1,2,3,4,5,6,7); endchar;
  131.  
  132. ecchar "Oldstyle numeral 8";
  133. beginchar("8",9u#,fig_height#,0);
  134. italcorr fig_height#*slant-u#;
  135. adjust_fit(0,0);
  136. numeric top_thickness,mid_thickness,bot_thickness,upper_side,lower_side,theta;
  137. top_thickness=max(fine.breadth,vround(slab-2vair_corr));
  138. bot_thickness=max(fine.breadth,vround(slab-vair_corr));
  139. x0=.5w; y0=.54h;
  140. if hefty: mid_thickness=vround 2/3vair; upper_side=hround(stem-3stem_corr);
  141.  lower_side=hround min(.5[curve,cap_curve]-stem_corr,upper_side+.25u);
  142.  penpos1(top_thickness,90); penpos2(upper_side,180);
  143.  penpos3(mid_thickness,270); penpos8(upper_side,360);
  144.  penpos4(mid_thickness,90); penpos7(lower_side,180);
  145.  penpos6(bot_thickness,270); penpos5(lower_side,360);
  146.  penpos0(vair,90); z3l=z0r; z4l=z0l;
  147.  x1=x6=.5w; x2r=w-x8r=hround u; x7r=w-x5r=hround .75u;
  148.  top y1r=h+o; bot y6r=-o; y2=y8=.5[y1l,y3l]; y7=y5=.5[y4l,y6l];
  149.  filldraw stroke pulled_arc.e(1,2)
  150.   & pulled_arc.e(2,3);  % left half of upper bowl
  151.  filldraw stroke pulled_arc.e(4,5)
  152.   & pulled_arc.e(5,6);  % right half of lower bowl
  153.  filldraw stroke pulled_arc.e(6,7)
  154.   & pulled_arc.e(7,4);  % left half of lower bowl
  155.  filldraw stroke pulled_arc.e(3,8)
  156.   & pulled_arc.e(8,1);  % right half of upper bowl
  157. else: pickup fine.nib; theta=90-angle(18u,h); slope:=-h/18u;
  158.  upper_side=max(fine.breadth,hround(.5[hair,stem]-stem_corr));
  159.  lower_side=hround(.5[hair,stem]+stem_corr);
  160.  if lower_side>1.2upper_side: upper_side:=lower_side; fi
  161.  pos1(top_thickness,-90); pos6(bot_thickness,-90);
  162.  x1=x6=.5w; top y1l=h+o; bot y6r=-o; pos0(cap_stem,theta);
  163.  lft x2l=w-rt x8l=hround 1.25u; lft x7r=w-rt x5r=hround .75u;
  164.  x2r-x2l=upper_side-fine; x5r-x5l=lower_side-fine;
  165.  ellipse_set(1l,2l,3l,0l); ellipse_set(1r,2r,3r,0r);
  166.  ellipse_set(6l,5l,4l,0l); ellipse_set(6r,5r,4r,0r);
  167.  numeric tau; tau=max(.8,.20710678/(superness-.5));
  168.  filldraw stroke z1e{left}..tension atleast tau..z2e{down}
  169.   ..z3e---z4e..z5e{down}..tension atleast tau..z6e{left};  % S stroke
  170.  pos7(lower_side,180); pos8(upper_side,180);
  171.  y7=.5[y5l,y5r]; y8=.5[y2l,y2r]; pos9(vair,90); z9=z0;
  172.  filldraw stroke z1e{right}..tension atleast tau..z8e{down}
  173.   ..tension atleast tau and atleast 1..{-18u,-.618h}z9e; % upper right stroke
  174.  filldraw stroke z6e{left}..tension atleast tau..z7e{up}
  175.   ..tension atleast tau and atleast 1..{18u,.5h}z9e; fi % lower left stroke
  176. penlabels(0,1,2,3,4,5,6,7,8,9); endchar;
  177.  
  178. ecchar "Oldstyle numeral 9";
  179. beginchar("9",9u#,x_height#,desc_depth#);
  180. italcorr x_height#*slant-u#;
  181. adjust_fit(0,0);
  182. numeric top_thickness,bot_thickness,side_thickness,pull;
  183. top_thickness=max(fine.breadth,vround(slab-2vair_corr));
  184. bot_thickness=max(fine.breadth,vround(slab-vair_corr));
  185. side_thickness=max(fine.breadth,hround 1/3[curve,cap_curve]);
  186. pull=min(.25,1.5superpull);
  187. pickup fine.nib; pos2(bot_thickness,-90);
  188. pos3(side_thickness,0); pos4(top_thickness,90);
  189. pos5(side_thickness,180); pos6(vair,270);
  190. w-rt x3r=lft x5r=hround max(.75u,1.5u-.5side_thickness);
  191. x4-.1u=x6+.1u=x2+.75u=.5w;
  192. bot y2r=-d-o; y3=.5[y2,y4]; top y4r=h+o;
  193. y5=.5[y4,y6]; bot y6=(vround 3/8[-d,h])-o;
  194. path p; p=pulled_super_arc.l(3,4)(pull);
  195. numeric t; t=xpart(p intersectiontimes((x3r,y5)--(x4,y5)));
  196. pos7(thin_join,360); z7l=point t of p;
  197. (x,y6r)=whatever[z7l,z6l]; x6r:=max(x,.5[x5r,x6]);
  198. filldraw stroke pulled_super_arc.e(2,3)(pull)
  199.  & {{interim superness:=more_super; pulled_super_arc.e(3,4)(pull)}}
  200.  & {{less_tense; pulled_super_arc.e(4,5)(pull) & pulled_super_arc.e(5,6)(pull)}}
  201.  & z6e{right}...{direction t of p}z7e;  % arc and bowl
  202. if serifs: pos1(hair,-180); pos0(flare,-180);
  203.  lft x0r=min(lft x2-eps,hround 1.2u);
  204.  y0=vround max(.1[-d,h]+.5flare,.15[-d,h]-.5flare)-o;
  205.  {{less_tense; bulb(2,1,0)}};  % arc and bulb
  206. else: pos1(.1[bot_thickness,flare],-120);
  207.  bot y1r=(vround .07[-d,h])-o; lft x1r=hround 1.3u;
  208.  filldraw stroke term.e(2,1,left,.9,4); fi  % terminal
  209. penlabels(0,1,2,3,4,5,6,7); endchar;
  210.  
  211.  
  212. %% ADAPTED FROM ITALD
  213.  
  214. ecchar "Oldstyle numeral 2";
  215. beginchar("2",9u#,x_height#,0);
  216. italcorr .8x_height#*slant-.4u#;
  217. adjust_fit(0,0); pickup fine.nib;
  218. pos1(vair,45); pos2(vair,0); pos3(vair,-90); pos4(hair,-180);
  219. pos5(vair,-270); pos6(curve,-360); pos7(hair,-405); pos8(hair,-360);
  220. x1=x2-.5u; rt x2r=hround(3.5u+.5vair);
  221. % GJC LOKHORST    x3=.6[x2,x4]; lft x4r=hround(u-.5hair);
  222. x3=.5[x2,x4]; lft x4r=hround u;
  223. x5=x7=.5w-.5u; rt x6r=hround(w-u); lft x8l=hround(1.5u-.5hair);
  224. y1=.5[.67x_height,h]; y2=.5[y1,y3];
  225. y4=1/3[y3,y5];y3=bar_height;
  226. top y5r=h+o; y6=.5[y5,y7]; y7=.52y4; bot y8=-o;
  227. filldraw stroke if not hefty:z1e{2(x2-x1),y2-y1}...{down}z2e...{left}z3e...fi
  228.  z4e{up}...pulled_arc.e(5,6)
  229.  ...z7e{2(x7-x6),y7-y6}...{down}z8e; % main stroke
  230. pos9(vair,-90); pos10(vstem+curve-stem,-90); pos11(hair,0);
  231. x9=w-x10=2.5u; rt x11r=hround(w-.5u+.5hair);
  232. y9=.25[y10,y7]; bot y10r=-o; y11=.26x_height;
  233. filldraw stroke z8e{up}...z9e{right}..{right}z10e...{up}z11e;  % bar
  234. penlabels(1,2,3,4,5,6,7,8,9,10,11); endchar;
  235.  
  236. ecchar "Oldstyle numeral 3";
  237. beginchar("3",9u#,x_height#,desc_depth#);
  238. italcorr .8x_height#*slant-.4u#;
  239. adjust_fit(0,0); pickup fine.nib;
  240. pos1(vair,45); pos2(vair,0); pos3(vair,-90); pos4(hair,-180);
  241. pos5(vair,-270); pos6(stem,-360); pos7(bar,-450); pos8(bar,-450);
  242. x1=x2-.5u; rt x2r=hround(3.5u+.5vair); x3=.5[x2,x4]; lft x4r=hround u;
  243. x5=x7=.5w; rt x6r=hround(w-u); x8=x7-u;
  244. y1=.5[.67x_height,h]; y2=.5[y1,y3]; y7=y8=.52[-d,h]; bot y3r=vround 1/4[y7,h];
  245. y4=1/3[y3,y5]; top y5r=h+o; y6=.5[y5,y7];
  246. filldraw stroke if not hefty: z1e{2(x2-x1),y2-y1}...{down}z2e...{left}z3e...fi
  247.  z4e{up}...pulled_arc.e(5,6) & pulled_arc.e(6,7)..z8e; % upper arc
  248. pos7'(vair,90); z7'l=z7r;
  249. pos9(curve,0); pos10(vair,-90); pos11(hair,-180); pos12(flare,-180);
  250. rt x9r=hround(w-u); x10=.5w-.5u; lft x11r=hround .75u;
  251. y9=.25[-d,h];
  252. bot y10r=-d-o;
  253. y11=.22[-d,h];bulb(10,11,12);  % bulb
  254. filldraw stroke pulled_arc.e(7',9) & pulled_arc.e(9,10);  % lower arc
  255. penlabels(1,2,3,4,5,6,7,8,9,10,11,12); endchar;
  256.  
  257. ecchar "Oldstyle numeral 4";
  258. beginchar("4",9u#,x_height#,desc_depth#);
  259. italcorr x_height#*slant+.5stem#-2.5u#;
  260. adjust_fit(0,0); pickup fine.nib;
  261. pos1(stem,0); pos6(stem,0); pos7(stem,0);
  262. pos2(bar,-45); pos3(bar,-90); pos4(bar,-90); pos5(bar,-45);
  263. rt x1r=hround(.5w+.5u+.5stem); lft x2l=hround .25u;
  264. x3=2.75u; x4=w-2u; rt x5r=hround(w-.25u);
  265. rt x6r=rt x7r=hround(2/3w+.5stem);
  266. y1+.5stem=h+o; bot y2r=0; bot y3r=vround(.08h-.5bar);
  267. bot y4r=vround-.5bar; bot y5r=vround(.03h-.5bar);
  268. y6+.5stem=bar_height; y7-.5stem=-d;
  269. filldraw circ_stroke z1e{down}...{3(x2-x1),y2-y1}z2e;  % diagonal
  270. filldraw stroke z2e{z1-z2}...z3e{right}..{right}z4e
  271.  ...{x5-x4,2(y5-y4)}z5e;  % bar
  272. filldraw z6l---z7l..z7r---z6r..cycle;  % stem
  273. penlabels(1,2,3,4,5,6,7); endchar;
  274.  
  275. ecchar "Oldstyle numeral 7";
  276. beginchar("7",9u#,x_height#,desc_depth#);
  277. italcorr x_height#*slant;
  278. adjust_fit(0,0); pickup fine.nib;
  279. numeric fat_curve; fat_curve=1.4[stem,curve];
  280. pos1(hair,0); pos2(hair,0); pos3(vstem+curve-stem,-90);
  281. pos4(vair,-90); pos5(hair,0); pos6(fat_curve,0);
  282. top y1=h+o; y2=bar_height; y3l=y5=y1;
  283. bot y4r=vround(.5[y2,h]-.5vair); y6-.5fat_curve=-d-o;
  284. lft x2l=hround(.5u-.5hair); x3=.5w-.5u; x4=2/3w;
  285. rt x5r=hround(w-.75u+.5hair); rt x6r=hround(.5w+u+.5fat_curve);
  286. z1=z2+whatever*(z5-z6); filldraw stroke z1e--z2e;  % serif
  287. filldraw stroke z2e{z1-z2}...z3e{right}..{right}z4e
  288.  ...{2(x5-x6),y5-y6}z5e;  % bar
  289. filldraw circ_stroke z6e{up}...{2(x5-x6),y5-y6}z5e;  % diagonal
  290. penlabels(1,2,3,4,5,6); endchar;
  291.  
  292. endinput;
  293.